package com.itany.spring.service;

import com.itanty.spring.entity.User;
import com.itanty.spring.execption.UserExistException;
import com.itanty.spring.execption.UserNotExistException;

/**
 * @date 2025/9/25
 */
public interface UserService {
    /**
     * 用户注册
     * @param username  用户名,不能重复
     * @param password
     * @param phone
     * @param address
     */
    void register(String username,String password,String phone,String address) throws UserExistException;

    /**
     * 用户登录
     * @param username
     * @param password
     */
    User login(String username, String password) throws UserNotExistException;
}
